<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="panel panel-default panel-intro">
        <div class="panel-heading"><div class="panel-lead"><em>{:__('盒子信息')}</em></div></div>
        <div class="panel-body">
            <input type="hidden" id="ids" name="ids" value="{$ids}">
            <div class="form-group" {neq name="muti" value="1"} style="display:none;"{/neq}>
                 <label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-user_id"  class="form-control" name="row[user_id]" type="text" value="{$info.user_id}">
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('城市')}{:__('小区单元')}:</label>
                <div class="col-xs-10">
                    <div class="form-inline" data-toggle="cxselect" data-selects="province,city,area,quarters,unit_id,room_id">
                        <select id="c-province" class="province form-control have-goods" name="province" data-url="ajax/area" >
                            {neq name="$info.province" value="0"}
                            <option value="{$info.province}" selected="">{$info.province_name}</option>
                            {/neq}

                        </select>
                        <select id="c-city"  class="city form-control have-goods" name="city" data-url="ajax/area" >
                            {neq name="$info.city" value="0"}
                            <option value="{$info.city}" selected="">{$info.city_name}</option>
                            {/neq}
                        </select>
                        <select id="c-area"  class="area form-control have-goods" name="area" data-url="ajax/area" >
                            {neq name="$info.area" value="0"}
                            <option value="{$info.area}" selected="">{$info.area_name}</option>
                            {/neq}
                        </select>
                        <select id="c-quarters"  class="quarters form-control have-goods" name="quarters" data-url="box/address/house/cxselect?type=quarters">
                            {neq name="$info.quarters_id" value="0"}
                            <option value="{$info.quarters_id}" selected="">{$info.quarters_name}</option>
                            {/neq}
                        </select>
                        <select id="c-unit_id"  class="unit_id form-control" name="unit_id" data-url="box/address/house/cxselect?type=unit" data-query-name="quarters_id">
                            {neq name="$info.unit_id" value="0"}
                            <option value="{$info.unit_id}" selected="">{$info.unit_name}</option>
                            {/neq}
                        </select>
                        <select id="c-room_id"  class="room_id form-control" name="room_id" data-url="box/address/house/cxselect?type=room" data-query-name="unit_id">
                            {neq name="$info.room_id" value="0"}
                            <option value="{$info.room_id}" selected="">{$info.room_name}</option>
                            {/neq}
                        </select>
                    </div>
                </div>
            </div>
            <div class="form-group" {neq name="muti" value="1"} style="display:none;"{/neq}>
                 <label class="control-label col-xs-12 col-sm-2">{:__('Contacts')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-contacts" class="form-control form-control" name="row[contacts]" type="text" value="{$info.contacts}">
                </div>
            </div>
            <div class="form-group" {neq name="muti" value="1"} style="display:none;"{/neq}>
                 <label class="control-label col-xs-12 col-sm-2">{:__('性别')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <select id="c-sex" class=" form-control " name="row[sex]" >
                        
                        <option value="1" {eq name="$info.sex" value="1"}selected=""{/eq}>男</option>
                        
                        <option value="0" {eq name="$info.sex" value="0"}selected=""{/eq}>女</option>

                    </select>
                   
                </div>
            </div>
            <div class="form-group" {neq name="muti" value="1"} style="display:none;"{/neq}>
                 <label class="control-label col-xs-12 col-sm-2">{:__('Telephone')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-telephone" class="form-control form-control" name="row[telephone]" type="text" value="{$info.telephone}">
                </div>
            </div>
            <div class="form-group" {neq name="muti" value="1"} style="display:none;"{/neq}>
                 <label class="control-label col-xs-12 col-sm-2">{:__('Remark')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-remark" class="form-control form-control" name="row[remark]" type="text" value="{$info.remark}">
                </div>
            </div>
            <div class="form-group " {eq name="$is_add_goods" value="1"}style="display:none;"{/eq}>
                <label class="control-label col-xs-12 col-sm-2"></label>
                <div class="col-xs-12 col-sm-8">
                    <a class="btn-save-user btn btn-success">{:__('保存盒子信息')}</a>
                </div>
            </div>
        </div>
    </div>


    <div class="panel panel-default panel-intro">
        <div class="panel-heading">
            <div class="panel-lead">
                <em>{:__('盒子商品信息')}</em>
                如要添加商品,请先选择小区后保存盒子信息
            </div>
        </div>
        <div class="panel-body">
            <div id="myTabContent" class="tab-content">
                <div class="tab-pane fade active in" id="first">
                    <div class="widget-body no-padding">
                        <div id="toolbar1" class="toolbar">
                            <a href="javascript:;" class="btn btn-success btn-addgoods" {eq name="$is_add_goods" value="0"}style="display:none;"{/eq} data-id="{$ids}" title="添加商品"><i class="fa"></i>添加商品</a>
                        </div>
                        <table id="table" class="table table-striped table-bordered table-hover" width="100%" box-ids="{$ids}" ids="{$user_box_ids}" is-have-goods="{$is_have_goods}">
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed ">{:__('保存')}</button>
        </div>
    </div>
</form>

